package compro.admission.form.email;

import compro.admission.form.entity.User;

public class RegisterEmail extends EmailTemplate{
	Email email;
	User user;
	
	public RegisterEmail(User user) {
		super(new Email());
		this.user = user;
		setEmailContent();
	}

	@Override
	public void setEmailContent() {
		super.getEmail().setToEmail(user.getEmail());
		super.getEmail().setSubject("Registration");
		String content = "Hi "+user.getFirstname() + ","; 
		content += "\n\n";
		content += "Your current login information is now:\n";
		content += "username: " + user.getEmail() + "\n";
		content += "password: " + user.getPassword() + "\n";
		content += "\n";
		content += "Best Regards,\n";
		content += "Admission Staff\n";
		content += "Maharishi University of Management";
		content += "\n\n";

		super.getEmail().setMailText(content);
		
	}

}
